package com.starbaba.stat.view;

import java.util.List;

import com.base.common.log.LogService;
import com.starbaba.core.utils.PropertyParamMapBuilder;
import com.starbaba.core.utils.Struts2Utils;
import com.starbaba.core.utils.json.JsonUtils;
import com.starbaba.core.web.page.PageResponse;
import com.starbaba.core.web.struts2.BaseAction;
import com.starbaba.stat.service.StatUserBackService;
import com.starbaba.stat.service.impl.StatUserBackServiceImpl;
import com.tuanzi.server.loan_base.model.db.stat.Stat_user_sms_back;

@SuppressWarnings({"rawtypes", "unchecked", "serial"})
public class StatUserBackAction extends BaseAction {
	
	public void getInfoList(){
		 paramsMap = PropertyParamMapBuilder.buildFromHttpRequest(Struts2Utils.getRequest(),paramsMap);
		 parsePageRequest();
		 PageResponse pageResponse = new PageResponse();
		 int start = pageRequest.getIDisplayStart();
		 int length = pageRequest.getIDisplayLength();
		 StatUserBackService service=new StatUserBackServiceImpl();
		 try {
			List<Stat_user_sms_back> list = service.getInfoList(paramsMap, start, length, pageResponse);
			pageResponse.setAaData(list);
			pageResponse.setSEcho(pageRequest.getSEcho());
			
			sendJsonMessage(JsonUtils.toJson(pageResponse, null, true, null, false));
			
		} catch (Exception e) {
			LogService.error("查询外部推广回拉短信激活数错误",e);
			e.printStackTrace();
		}
	}
	
}
